{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [],
   "source": [
    "class AdalineGD(object):\n",
    "    \"\"\"\n",
    "    eta: float\n",
    "    学习效率，处于0和1\n",
    "\n",
    "    n_iter: int\n",
    "    对训练数据进行学习改进次数\n",
    "\n",
    "    w_: 一维向量\n",
    "    存储权重数值\n",
    "\n",
    "    error_:\n",
    "    存储每次迭代改进时，网络对数据进行错误判断的次数\n",
    "    \"\"\"\n",
    "\n",
    "    def __init__(self, eta: float = 0.01, n_iter: int = 50):\n",
    "        self.const_ = None\n",
    "        self.w_ = None\n",
    "        self.cost_ = None\n",
    "        self.eta = eta\n",
    "        self.n_iter = n_iter\n",
    "\n",
    "    def fit(self, X, y):\n",
    "        \"\"\"\n",
    "        X: 二维数组 [n_samples, n_features]\n",
    "        n_samples表示X 中含有训练数据条目数\n",
    "        n_features含有4个数据的一维向量，用户表示一条训练条目\n",
    "\n",
    "        y: 一维向量\n",
    "        用户存储每一训练条目对应的正确分类\n",
    "        \"\"\"\n",
    "        self.w_ = np.zeros(1 + X.shape[1])\n",
    "        self.cost_ = []\n",
    "        for i in range(self.n_iter):\n",
    "            output = self.net_input(X)\n",
    "            errors = (y - output)\n",
    "            self.w_[1:] += self.eta * X.T.dot(errors)\n",
    "            self.w_[0] += self.eta * errors.sum()\n",
    "            cost = (errors ** 2).sum() / 2.0\n",
    "            self.cost_.append(cost)\n",
    "        return self\n",
    "\n",
    "    def net_input(self, X):\n",
    "        return np.dot(X, self.w_[1:] + self.w_[0])\n",
    "\n",
    "    def activation(self, X):\n",
    "        return self.net_input(X)\n",
    "\n",
    "    def predict(self, X):\n",
    "        return np.where(self.activation(X) >= 0, 1, -1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "file = \"pythondata_iris.data.csv\"\n",
    "df = pd.read_csv(file, header=None)\n",
    "df.head(10)\n",
    "\n",
    "# rc方法，其实和设置rcParams 基本等效\n",
    "# 设置font字典为 SimSun（宋体），大小为12（默认为10）\n",
    "font = {'family': 'Arial Unicode MS',\n",
    "        'size': '12'}\n",
    "# 设置 字体\n",
    "plt.rc('font', **font)\n",
    "# 解决中文字体下坐标轴负数的负号显示问题\n",
    "plt.rc('axes', unicode_minus=False)\n",
    "\n",
    "y = df.iloc[0:100, 4].values\n",
    "# print(y)\n",
    "y = np.where(y == 'Iris-setosa', -1, 1)\n",
    "# print(y)\n",
    "X = df.iloc[0:100, [0, 2]].values\n",
    "# print(X)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [],
   "source": [
    "from matplotlib.colors import ListedColormap\n",
    "\n",
    "\n",
    "def plot_decision_regions(X, y, classifier, resolution=0.02):\n",
    "    markers = ('s', 'x', 'o', 'v')\n",
    "    colors = ('red', 'blue', 'lightgreen', 'gray', 'cyan')\n",
    "    cmap = ListedColormap(colors[:len(np.unique(y))])\n",
    "    x1_min, x1_max = X[:, 0].min() - 1, X[:, 0].max()\n",
    "    x2_min, x2_max = X[:, 1].min() - 1, X[:, 1].max()\n",
    "    # print(x1_min, x1_max)\n",
    "    # print(x2_min, x2_max)\n",
    "\n",
    "    xx1, xx2 = np.meshgrid(np.arange(x1_min, x1_max, resolution), np.arange(x2_min, x2_max, resolution))\n",
    "    # print(np.arange(x1_min, x1_max, resolution).shape)\n",
    "    # print(np.arange(x1_min, x1_max, resolution))\n",
    "    # print(xx1.shape)\n",
    "    # print(xx1, xx2)\n",
    "\n",
    "    Z = classifier.predict(np.array([xx1.ravel(), xx2.ravel()]).T)\n",
    "    print(xx1.ravel())\n",
    "    print(xx2.ravel())\n",
    "    print(Z)\n",
    "\n",
    "    Z = Z.reshape(xx1.shape)\n",
    "    plt.contourf(xx1, xx2, Z, alpha=0.4, cmap=cmap)\n",
    "    plt.xlim(xx1.min(), xx1.max())\n",
    "    plt.ylim(xx2.min(), xx2.max())\n",
    "\n",
    "    for idx, cl in enumerate(np.unique(y)):\n",
    "        plt.scatter(x=X[y == cl, 0], y=X[y == cl, 1], alpha=0.8, c=cmap(idx), marker=markers[idx], label=cl)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n",
      "*c* argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with *x* & *y*.  Please use the *color* keyword-argument or provide a 2D array with a single row if you intend to specify the same RGB or RGBA value for all points.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3.3  3.32 3.34 ... 6.94 6.96 6.98]\n",
      "[0.   0.   0.   ... 5.08 5.08 5.08]\n",
      "[-1 -1 -1 ...  1  1  1]\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAESCAYAAAAG+ZUXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnoUlEQVR4nO3dfZwddXn38c+1CZCGREISIlICGyAaLfRGCYoNLCJI0aoVlJZbLC9odBO4b4QXrUiCFimVja1YFSsY3aKIeleIID5iCJBFykMIDwKagjxIkYaE8JQYEkj2uv/4zdk9e3IeJtmZOTNzvu/Xa197zpw5M9ec3Vz57TW/B3N3R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uVphGlijyUsbnJeFMffKLFL1tRyl9Jx95uBm83sG1WbX3b3+6LHRwHPuvsNhFWvKjdfp7r7VxocdizwN8B+wMXufq6ZvR24xMwWE0oxg4S5wF9LmHCqH1gNbDazvdz96fqHFkmebqhKaUXJfZG7/9bMvgW8keEEfDqhlV0xhZDAn6na9nfuflt0LANmuPtjDc51LKGnzfHA3cA10XlnRtsOBT7n7ncneY0ijSi5i4iUkGruIiIlpOQuIlJCSu4iIiWk5C4iUkJK7iIiJaTkLiJSQv8fJ1RxconIDQwAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEECAYAAAArlo9mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAfgElEQVR4nO3deZhdVZnv8e+vBlIVSCgJxRSNoUHi5XaCSCG0yCAKqDRcGvDqlW4vdLd5xAkbbyCIw7XxSjBEBUUR4YJBUTCQgA12CIRAQKYKQwAhYZBAKgxhCGQklcrbf5xdSaVqn+RUUrvOsH+f56kn5+yzz9lrU8Vbq9611rsUEZiZWe2rK3cDzMxscDjgm5nlhAO+mVlOOOCbmeWEA76ZWU40lLsBxey8884xevTocjfDzKyqzJs377WIaE17rWID/ujRo2lvby93M8zMqoqkRcVec0rHzCwnHPDNzHLCAd/MLCcc8M3McsIB38wsJyp2ls7WmvFwB5NnLmDJstXs0dLMhGPGcML+I8vdLDOzssss4Et6EFiZPP0r8D3giuSaTwJfjoiugbzmjIc7OOeGx1jdWfjYjmWrOeeGxwAc9M0s9zJJ6UjaDmiIiCOSr9OAC4BJEXF4ct3jB/q6k2cu2BDsu63u7GLyzAUDfSkzs6qTVQ5/LLC9pFmSbpd0MHA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M7OccMC3XJJ0hKRXexSsmiPpDwPwuVdJ+sRAtNFsoDWUuwFmZTQ7Ij5b7kaYDRb38M16SHr6v5A0W9JMSa3J8UmS7pV0v6SvJMfGSLotKWN8q6Rdko8Zn7z3IUkfktQkaXry/ockHV22G7Rccw/f8uzIZFVnt5uTf++MiNMl/SvwTUm3U6hp82EK/8/cJelO4HzgRxFxi6Tjgf2T9z8UEd+X9I8Uls3/gsKq2U9QKIL13zO+L7NUDviWZ31SOpKOZWNZ2vuAfwBeAu5Kqhd2Svoz8H5gb+AegIi4KXn//wLmJe9/GRgaEY9JuhS4GmimxvdvsMrllI5ZXwcm/x5CoTb7U8DhKmhMjj8J/IVC3XIkfVbSl5P3bVKvRNI44F0RcTzwvymUwjUbdO7hW571TulAoQf+r5LOolCL/dSkLv+hwL3JOb+LiMeTc34p6ZsUqlp+no2/LHpaCHxL0qeBJgo7WJkNOhdPM+uhu1JjRDy1pXPNqo1TOmZmOeEevplZTriHb2aWEw74ZmY54YBvZpYTDvhmZjnhgG9mlhP/BVZ2L1mubS9GAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "ada = AdalineGD(eta=0.0001, n_iter=50)\n",
    "ada.fit(X, y)\n",
    "plot_decision_regions(X, y, classifier=ada)\n",
    "plt.title('Adaline-Gradient descent')\n",
    "plt.xlabel('花茎长度')\n",
    "plt.ylabel('花瓣长度')\n",
    "plt.legend(loc='upper left')\n",
    "plt.show()\n",
    "\n",
    "plt.plot(range(1, len(ada.cost_) + 1), ada.cost_, marker='o')\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('sum-squard-error')\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}